﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(PathLineRender))]
public class PathLineRenderEditor : Editor
{
    void OnSceneGUI()
    {
        PathLineRender path = target as PathLineRender;
        Handles.color = Color.red;
        var connectedObjectsParent = path.transform;
        for (int i = 0; i < connectedObjectsParent.childCount - 1; i++)
        {
            Handles.DrawLine(connectedObjectsParent.GetChild(i).position, connectedObjectsParent.GetChild(i + 1).position);
        }
    }
}
